package com.arch.flink;

import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.table.api.EnvironmentSettings;
import org.apache.flink.table.api.bridge.java.StreamTableEnvironment;

/**
 * @author pizhihui
 * @date 2023-04-27 17:39
 */
public class FlinkSqlUtil {

    public static StreamTableEnvironment getBlinkTableEnv(StreamExecutionEnvironment env) {
        EnvironmentSettings envSetting = EnvironmentSettings
                .newInstance()
//                .useBlinkPlanner()
                .inStreamingMode()
                .build();

        return StreamTableEnvironment.create(env, envSetting);
    }

}
